<!doctype html>

<html>

<head>

<meta charset="utf-8">
<meta name="format-detection" content="telephone=no"/>  
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">

<title>慕斯荟</title>

<link rel="stylesheet" href="__STATIC__/wap/css/public.css">

<link rel="stylesheet" href="__STATIC__/wap/css/style.css">

<script src="__STATIC__/wap/js/jquery.js">

</script>

</head>



<body>

	<div class="mainer">

		<div class="main">

         	 <div class="top my">

             	 <a href="{:U('Index/index')}"><img src="__STATIC__/wap/img/2_01.png"></a><span>我</span>

             </div>

             <div class="inf">

             	 <div class="name">

                 	 <div class="na-main">

                     	 <ul>

                             <li>昵 称 | {$rs.nickname}</li>

                             <li>姓 名 | {$rs.name}</li>

                             <li>手 机 | {$rs.mobile}</li>

                             <li>慕 龄 | {$rs.time}</li>

                         </ul>	 	

                     </div>

                     <span class="avatar"><img src="http://wx.qlogo.cn/mmopen/{$rs.imgurl}"></span>

                 </div>

                 <a><img src="__STATIC__/wap/img/change_03.png"></a>

             </div>

            <div class="sale" style="margin-bottom:1%">

                <a href="{:U('PointRecord/index')}" class="sale-left"><img src="__STATIC__/wap/img/2_03.png"><span>{$rs.point}分<br>积分记录</span></a>

                <a href="{:U('MyCard/index')}" class="sale-right"><img src="__STATIC__/wap/img/2_04.png"><span>{$cardCount}张<br>优惠券</span></a>

            </div>

             

             <div class="sale">

             	 <div class="sale-left">

                 	 <a href="{:U('Exchange/index')}"><img src="__STATIC__/wap/img/2_09.png"><span>积分兑换</span></a>

                 </div>

                 <div class="sale-right">

                     <div class="adv-bot" style=" margin-bottom: 1.5%;">

                     	 <a href="{:U('Order/index')}"><img src="__STATIC__/wap/img/2_12.png"><span>订单</span></a>

                     </div>

                     <div class="adv-top">

                     	 <a href="{:U('Subscribe/index')}" class="ti"><img src="__STATIC__/wap/img/2_13.png"><span>关注</span></a>





                         <a class="cad" href="{:U('News/index')}">

                             <if condition="$messageCount eq 0">

                                 <img src="__STATIC__/wap/img/2_14_1.png">



                                 <span>消息</span><span class="two"></span>

                                 <else/>

                                 <img src="__STATIC__/wap/img/2_14.png">



                                 <span>消息</span><span class="two">{$messageCount}</span>

                             </if>

                             </a>

                     </div>

                 </div>

             </div>

         </div> 	

    </div>





<div class="flow" id="bak" style="display:none">



</div>

    <div class="flow" id="form" style="display:none;height:0">

    	<div class="form">

        	<p></p>

            <div class="fo">

                <form action="{:U('Vip/regist')}" method="post" id="myform">





            	<div class="f1">

                    <span>

                    姓名：<i style="opacity:0">姓名</i>

                    </span>

                    <input type="text" name="name" id="name" placeholder="请输入姓名" value="{$vipInfo.name}">

                </div>

                <div class="f1">

                    <span>

                    手机号码：

                    </span>

                    <input type="text" id="mobile" name="mobile" placeholder="请输入手机号码" value="{$vipInfo.mobile}">

                </div>

                <div class="f1">

                    <span style="opacity:0">

                    手机号码：

                    </span>

                    <div style="display:inline-block;width: 62%;">

                    <input type="text" name="verify" style="width:35%"><a id="sendVerify" class="sn" style="width: 55%;">获取验证码</a>

                    </div>

                </div>

                <a class="save1" id="tosubmit">保 存</a>

                </form>

            </div>

        </div>

    </div>



</body>

</html>

<script>

    $(function () {



        $("#sendVerify").click(function () {



            if ($("#mobile").val() == null || $("#mobile").val() == '') {

                alert('请填写手机号码');

                return false;

            }

            $.get("{:U('Flush/sendSms')}", {

                mobile: $("#mobile").val()

            }, function (data, status) {

                if (data == 'has') {

                    alert('请于一分钟后再试');

                    return false;

                }

                if(data=='already'){

                    alert('手机号码已被注册');

                    return false;

                }

                if(data=='must11' || data=='mustnum'){

                    alert('手机号码格式错误');

                    return false;

                }

                if (data == 'ok') {

                    alert('验证码已经发送，请注意查收短信！');

                    settime(this);

                    return false;

                }

            });

        });

        $("#tosubmit").click(function () {

            //判空并提交

            var name=$("#name").val();

            var mobile=$("#mobile").val();

            if(name==''||name==null){

                alert('姓名不能为空');

                return false;

            }

            if(mobile==''||mobile==null){

                alert('手机号码不能为空');

                return false;

            }

            $("#myform").submit();

        });

    })



</script>



<script type="text/javascript">

    var countdown = 60;

    function settime(obj) {

        if (countdown == 0) {

            $("#sendVerify").html("获取验证码");

            countdown = 60;

            return;

        } else {

            $("#sendVerify").html("重新发送(" + countdown + ")");

            countdown--;

        }

        setTimeout(function () {

                    settime($("#sendVerify"))

                }

                , 1000)

    }



</script>

<script>

$(".inf a").click(function(){

    $("#bak").show();

	$("#form").show();

})

$("#bak").click(function(){

    $("#bak").hide();

    $("#form").hide();

})



</script>

